<template>
  <div class="main-content1">
    <control-bar>
      <n-row gutter="20">
        <n-col :span="3">
          <n-input v-model:value="searchKeywords" placeholder="请输入关键字"></n-input>
        </n-col>
        <n-col :span="3">
          <n-button type="primary" @click="getImgList">搜索</n-button>
        </n-col>
        
      </n-row>
    </control-bar>
    <main-content :height="60">
      <el-table :data="activeDataList">
        <el-table-column label="任务名称" property="a3">
        </el-table-column>
        <el-table-column label="耗时" property="a8">
        </el-table-column>
        <el-table-column label="进度" property="a1">
        </el-table-column>
        <el-table-column label="分割方式" property="a2">
        </el-table-column>
        <el-table-column label="容量" property="a4">
        </el-table-column>
        <el-table-column label="创建时间" property="a7">
        </el-table-column>
        <el-table-column label="操作" property="a10">
          <template #default="scope">
            <el-button @click="handShowModel">下载</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
          v-model:current-page="pagination.current"
          @current-change="(value) => getImgList()"
          :page-size="pagination.size"
          :total="pagination.total"
      ></el-pagination>
      <el-dialog
          v-model="dialogVisible"
          :title="title"
          width="1000"
          :before-close="handleClose"
      >
        <div class="codeBox" style="height: 500px;overflow: auto">
          <n-code
              :code="code"
              language="javascript"
          />
        </div>

        <template #footer>
          <div class="dialog-footer">
            <el-button type="primary" @click="dialogVisible = false">
              关闭
            </el-button>
          </div>
        </template>
      </el-dialog>
    </main-content>
  </div>
</template>
<script setup lang="ts">
  import { ref } from "vue"
  import ControlBar from "@/components/common/ControlBar.vue";
  import MainContent from "@/components/common/MainContent.vue";
  let title = ref('查看')
  let dialogVisible = ref(false)
  const activeDataList = ref([
    {
      a1:'已完成',
      a2: '无分幅',
      a3: '郑州影像',
      a4: '500GB',
      a5: '北京',
      a6: '成功',
      a7: '2024-08-24',
      a8: '14ms',
      a9: ''
    }, {
      a1:'进行中：25%',
      a2: '军标分幅（32幅）',
      a3: '西部影像',
      a4: '236GB',
      a5: '北京',
      a6: '成功',
      a7: '2024-08-24',
      a8: '14ms',
      a9: ''
    }
  ])
  const pagination = ref({
    total: 10,
    size:10
  })
  function handShowModel() {
    dialogVisible.value = true
  }
  function getImgList() {}
  function handleClose() {
    dialogVisible.value = false
  }
  const code1 = "层级15-18;时间2020.5-2024.3"

</script>
